package com.liuhaoqi.raletiveblog.mapper;


import com.liuhaoqi.raletiveblog.entity.Blog;
import com.liuhaoqi.raletiveblog.entity.dto.BlogDto;
import com.liuhaoqi.raletiveblog.result.BlogPageResult;
import com.liuhaoqi.raletiveblog.result.business.PageResult.AddBlogPageResult;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface BlogMapper {
    int getBlogsnum();
    int updateBlog(Blog blog);
    int deleteBlogByBlogId(Long id);
    List<AddBlogPageResult> getAdminBlogDtoList(@Param("start") int start,
                                                @Param("end") int end,
                                                @Param("pagesize") int pagesize);
    Long getBlogByCreateTime();
    int updateBlogCommentNumByBLogId(Long id);
    int getBlogViewsById(Long blogId);
    List<BlogDto> getBlogListByCategoryname(String categoryName);
    Blog getDetailBlogAndConvert(Long id);
    List<BlogDto> getBlogListNoFenYe();
    int updateDetailBlogViewsById(Long id);
    List<BlogDto> getBlogDtoTag();
    BlogDto getDetailBlogById(Long id);
    List<BlogDto> getBlogList();
    int deleteByPrimaryKey(Long id);

    int insert(Blog record);

    int insertSelective(Blog record);

    Blog selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Blog record);

    int updateByPrimaryKeyWithBLOBs(Blog record);

    int updateByPrimaryKey(Blog record);
}